import React, {Fragment} from "react";
import {NavBar, SearchBar} from "antd-mobile";

class APP extends React.Component{
    constructor(props) {
        super(props);

    }

    render(){
        return(
            <div className="headerApp">
                {this.props.name === undefined ?
                    <div className={"homeHeader"}>
                        <span className={"mT"}>美团</span>
                        <SearchBar placeholder='请输入内容' onSearche={
                            value => {
                                console.log("搜索的内容是")
                            }
                        } classnam={"searchDiv"}/>
                    </div>:
                     <Fragment>
                    <NavBar onBack={this.goBack} backArrow={false}>{this.props.name}</NavBar>
                     </Fragment>
                }
            </div>
        )
    }
}
export default APP;
